<template>
  <div id="article">
    <div class="header">
      <dl>
        <dt class="f-16 bold">{{info.title}}</dt>
        <dd class="opacity-8">
          <span class="mr-10"><i class="el-icon-reading mr-2"></i>{{info.categoryName}}</span>
          <span class="mr-10"><i
            class="el-icon-time mr-2"></i>{{this.$common.formatDate(info.publishTime)}}</span>
          <span class="mr-10"><i class="el-icon-view mr-2"></i>{{info.readingNum}} 浏览</span>
          <span><i class="el-icon-chat-dot-round mr-2"></i>{{info.commentNum}} 评论</span>
        </dd>
      </dl>
    </div>
    <div class="line"></div>

    <div class="content line-1" v-html="info.content" v-highlight></div>

    <div class="label line-1">
      继续浏览有关
      <template v-for="item in info.labelList">
        <router-link :key="item.id" :to="{path: '/category/' + item.id}">{{item.name}}</router-link>
      </template>
      的文章
    </div>

    <div class="desc line-1">
      <span class="block"><span class="important">|</span>非特殊说明，本博所有文章均为博主原创。</span>
      <span class="block">如若转载，请注明出处：{{url}}</span>
    </div>

    <div class="footer tl">
      <el-row :gutter="6">
        <el-col :span="12" class="ellipsis">
          <span>上一篇：</span>
          <router-link class="el-link el-link--default" v-if="Object.keys(info.lastArticle).length !== 0"
                       :title="info.lastArticle.title"
                       :to="{name: 'article', params: {id: info.lastArticle.id}}">
            {{info.lastArticle.title}}
          </router-link>
          <span v-else>没有了</span>
        </el-col>
        <el-col :span="12" class="ellipsis">
          <span>下一篇：</span>
          <router-link class="el-link el-link--default" v-if="Object.keys(info.nextArticle).length !== 0"
                       :title="info.nextArticle.title"
                       :to="{name: 'article', params: {id: info.nextArticle.id}}">
            {{info.nextArticle.title}}
          </router-link>
          <span v-else>没有了</span>
        </el-col>
      </el-row>
    </div>
    <div class="line-10"></div>

    <Comment :type="title" :articleId="info.id" :comments="commentList" @getCommentList="getCommentList"/>

  </div>
</template>

<script>
  import Comment from '../../components/Comment'
  import hljs from 'highlight.js' //导入代码高亮文件
  import 'highlight.js/styles/atom-one-light.css'

  //自定义一个代码高亮指令
  Vue.directive('highlight', function (el) {
    let highlight = el.querySelectorAll('pre');
    highlight.forEach((block) => {
      hljs.highlightBlock(block)
    })
  })

  export default {
    name: "article.vue",
    components: {
      Comment
    },
    watch: {
      "$route": "reload"
    },
    data() {
      return {
        info: {
          publishTime: 0,
          lastArticle: {},
          nextArticle: {},
        },
        commentList: [],
        url: '',
        title: '评论',
        comment: '',
        nickname: '',
        email: '',
      }
    },
    methods: {
      async getArticleInfo() {
        let id = parseInt(this.$route.params.id)
        const loading = this.openLoading();
        // this.info = await this.$api.articleInfo(id)
        this.info = {"id":129,"title":"Webstorm 2020 永久激活破解","categoryId":0,"author":"","content":"\u003cp\u003e\u003cspan style=\"color: rgb(102, 102, 102); font-family: Avenir, Helvetica, Arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255);\"\u003e以前使用JetBrains的时候都是直接通过\u0026nbsp;\u003c/span\u003e\u003ca href=\"http://idea.lanyus.com\" target=\"_blank\" title=\"http://idea.lanyus.com\" style=\"text-decoration: underline; font-family: Avenir, Helvetica, Arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(0, 112, 192);\"\u003e\u003cspan style=\"font-family: Avenir, Helvetica, Arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(0, 112, 192);\"\u003ehttp://idea.lanyus.com\u003c/span\u003e\u003c/a\u003e \u003cspan style=\"color: rgb(102, 102, 102); font-family: Avenir, Helvetica, Arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255);\"\u003e获取注册码激活，但是后来不允许使用了，现在需要破解激活了。\u003c/span\u003e\u003c/p\u003e\u003cp\u003e\u003cspan style=\"color: rgb(102, 102, 102); font-family: Avenir, Helvetica, Arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255);\"\u003e\u003cspan style=\"color: rgb(102, 102, 102); font-family: Avenir, Helvetica, Arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255);\"\u003e如果在https下请求，会出现安全拦截情况，可选择保留，因为上传的七牛云现在https收费，所以就用的http。\u003c/span\u003e激活破解文件先放出来：\u003c/span\u003e\u003c/p\u003e\u003cp\u003e\u003ca href=\"http://cdn.itspire.cn/1604972398861877.zip?e=1604976004\u0026token=7rg90RDSP7pt5f2-5ZoH_uk7AXcK2COq6bINSoX0:eeeUFDFxWgx1ThafNCC4Vz_7QgQ=\" target=\"_blank\" title=\"Webstorm 2020.1 破解激活.zip\" style=\"font-family: Avenir, Helvetica, Arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(0, 112, 192); text-decoration: underline;\"\u003e\u003cspan style=\"font-family: Avenir, Helvetica, Arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(0, 112, 192);\"\u003eWebstorm 2020.1 破解激活.zip\u003c/span\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e\u003cspan style=\"color: rgb(102, 102, 102); font-family: Avenir, Helvetica, Arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255);\"\u003e接下来我们来说明破解方法：\u003c/span\u003e\u003c/p\u003e\u003cp\u003e\u003cspan style=\"color: rgb(102, 102, 102); font-family: Avenir, Helvetica, Arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255);\"\u003e1、解压打开文件下lib文件夹\u003c/span\u003e\u003cspan style=\"color: rgb(102, 102, 102); font-family: Avenir, Helvetica, Arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255);\"\u003e，获取\u0026nbsp;\u003cspan style=\"font-family: Avenir, Helvetica, Arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(255, 0, 0);\"\u003ejetbrains-agen\u003cspan style=\"font-family: Avenir, Helvetica, Arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(255, 0, 0);\"\u003et.ja\u003c/span\u003er\u003c/span\u003e。\u003c/span\u003e\u003c/p\u003e\u003cp\u003e\u003cspan style=\"color: rgb(102, 102, 102); font-family: Avenir, Helvetica, Arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255);\"\u003e2、启动IDE，这时需要激活，我们选择试\u003c/span\u003e\u003cspan style=\"color: rgb(102, 102, 102); font-family: Avenir, Helvetica, Arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255);\"\u003e用（\u003cstrong\u003eEvaluate for free\u003c/strong\u003e）\u003c/span\u003e\u003cspan style=\"color: rgb(102, 102, 102); font-family: Avenir, Helvetica, Arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255);\"\u003e进入IDE；如果是因为试用过期，我们\u003cspan style=\"font-family: \u0026quot;PingFang SC\u0026quot;, \u0026quot;Microsoft YaHei\u0026quot;, \u0026quot;Helvetica Neue\u0026quot;, Helvetica, Arial, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);\"\u003e可\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"color: rgb(102, 102, 102); font-family: Avenir, Helvetica, Arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255);\"\u003e以使用reset_eval文件夹内的脚本重置。\u003c/span\u003e\u003c/p\u003e\u003cp\u003e\u003cspan style=\"color: rgb(102, 102, 102); font-family: Avenir, Helvetica, Arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255);\"\u003e3、\u003c/span\u003e\u003cspan style=\"color: rgb(102, 102, 102); font-family: Avenir, Helvetica, Arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255);\"\u003e将\u0026nbsp;\u003cspan style=\"font-family: Avenir, Helvetica, Arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(255, 0, 0);\"\u003ejetbrains-agent.jar\u003c/span\u003e 拖进IDE窗口，点击 \u0026quot;Restart\u0026quot; 按钮重启IDE。\u003c/span\u003e\u003c/p\u003e\u003cp\u003e\u003cspan style=\"color: rgb(102, 102, 102); font-family: Avenir, Helvetica, Arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255);\"\u003e4、\u003c/span\u003e\u003cspan style=\"color: rgb(102, 102, 102); font-family: Avenir, Helvetica, Arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255);\"\u003e弹出的JetbrainsAgent Helper对话框中，点击安装。\u003c/span\u003e\u003c/p\u003e\u003cp\u003e\u003cspan style=\"color: rgb(102, 102, 102); font-family: Avenir, Helvetica, Arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255);\"\u003e5、重启IDE。重启后可以点击菜单栏\u0026gt;Help\u0026gt;Register查看有效期至2089年。\u003c/span\u003e\u003c/p\u003e","introduction":"","commentNum":2,"readingNum":1101,"image":"","isTop":0,"status":0,"publishTime":1604973483,"categoryName":"其他","labelList":[{"id":41,"name":"其他","count":0}],"lastArticle":{"id":128,"title":"诡异现象 只有一个接口出现跨域问题"},"nextArticle":{"id":130,"title":"Vue 首次加载很慢，vendor文件过大优化"}}
      loading.close();
        // 更改标题
        this.$common.title(this.info.title)
      },
      async getCommentList(page = 1) {
        let id = parseInt(this.$route.params.id)
        let data = {
          article: id,
          page: page,
        }
        // this.commentList = await this.$api.commentList(this.$common.filterParam(data))
        this.commentList = {"list":[{"articleId":0,"auditTime":0,"avatar":"","children":[{"articleId":0,"auditTime":0,"avatar":"http://cdn.itspire.cn/avatar_1602748921550_1597302549650.jpg","contact":"","contactType":0,"content":"感谢分享，破解文件都是同一个大佬提供的，理论上其他版本也是可以激活的。","createTime":1607580547,"id":7,"ip":0,"nickname":"bzing","pid":6,"replyId":6,"replyNickname":"昨天的油条","status":0,"tid":6,"title":"","updateTime":0,"userId":1}],"contact":"","contactType":0,"content":"确实有点牛逼。。。看到一个大佬2020.3简体中文直接都可以激活，我只能说真香啊！https://www.789zhao.com/blog/JBZYO72PA98J.html","createTime":1607565305,"id":6,"ip":0,"nickname":"昨天的油条","pid":0,"replyId":0,"replyNickname":"","status":0,"tid":6,"title":"","updateTime":0,"userId":6},{"articleId":0,"auditTime":0,"avatar":"","children":[{"articleId":0,"auditTime":0,"avatar":"http://cdn.itspire.cn/avatar_1602748921550_1597302549650.jpg","contact":"","contactType":0,"content":"在unix或者linux下，执行shell脚本，找到文件目录，命令行执行 sh 文件名.sh 这个脚本就行；windows下双击执行 .vbs 脚本。","createTime":1608625314,"id":9,"ip":0,"nickname":"bzing","pid":8,"replyId":8,"replyNickname":"深蓝色的想念111","status":0,"tid":8,"title":"","updateTime":0,"userId":1},{"articleId":0,"auditTime":0,"avatar":"http://cdn.itspire.cn/avatar_1602748921550_1597302549650.jpg","contact":"","contactType":0,"content":"test","createTime":1609211431,"id":15,"ip":0,"nickname":"test2","pid":8,"replyId":8,"replyNickname":"深蓝色的想念111","status":0,"tid":8,"title":"","updateTime":0,"userId":9}],"contact":"","contactType":0,"content":"想问一下怎么使用reset_eval文件夹内的脚本重置","createTime":1608601326,"id":8,"ip":0,"nickname":"深蓝色的想念111","pid":0,"replyId":0,"replyNickname":"","status":0,"tid":8,"title":"","updateTime":0,"userId":7},{"articleId":0,"auditTime":0,"avatar":"http://cdn.itspire.cn/avatar_1602748921550_1597302549650.jpg","contact":"","contactType":0,"content":"test","createTime":1609211153,"id":10,"ip":0,"nickname":"test2","pid":0,"replyId":0,"replyNickname":"","status":0,"tid":10,"title":"","updateTime":0,"userId":9}],"pagination":{"page":1,"size":10,"total":6}}
      },
      reload() {
        this.getArticleInfo()
        this.getCommentList()
        this.url = window.location.href
      },
    },
    mounted() {
      this.$nextTick(() => {
        this.reload()
      });
    },
  }
</script>

<style scoped>

  dl {
    padding: 0;
  }

  dt {
    line-height: 28px;
  }

  .el-link {
    width: unset;
    height: unset;
    display: inline;
  }

  #article {
    text-align: left;
  }

  .el-breadcrumb {
    height: 25px;
    line-height: 25px;
    padding: 2px 20px;
  }

  .el-breadcrumb__inner.is-link {
    color: unset;
  }

  .header {
    padding: 10px 20px 0;
  }

  .content {
    padding: 1px 20px 5px;
  }

  .label {
    line-height: 40px;
  }

  .desc {
    padding: 8px 20px;
    background: #FBFBFB;
  }

  .desc .block {
    padding: 3px 0;
  }

  .footer {
    height: 50px;
    line-height: 50px;
    padding: 0 20px;
  }

  .important {
    font-weight: 900;
    color: #ff0000;
    margin-right: 5px;
    vertical-align: top;
  }

</style>
